package com.puzzlebazar.client.puzzle.view;

import java.util.Iterator;

import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.puzzlebazar.client.util.Tool;

public class Toolbar extends HorizontalPanel {

	/**
	 * Disable each tool in the toolbar
	 */
	public void disableAll() {
		for (Iterator<Widget> it = iterator(); it.hasNext();) {
			Widget widget = it.next();
			if( widget instanceof Tool )
				((Tool)widget).setEnabled(false);
		}		
	}	
	
	
}
